package com.ruoyi.stock.service.impl;

import com.ruoyi.stock.domain.StockBasic;
import com.ruoyi.stock.mapper.StockBasicMapper;
import com.ruoyi.stock.service.IStockBasicService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 股票基本信息Service业务层处理
 *
 * @author ruoyi
 * @date 2021-10-22
 */
@Service
public class StockBasicServiceImpl implements IStockBasicService {
  @Autowired private StockBasicMapper stockBasicMapper;

  /**
   * 查询股票基本信息
   *
   * @param id 股票基本信息主键
   * @return 股票基本信息
   */
  @Override
  public StockBasic selectStockBasicById(Long id) {
    return stockBasicMapper.selectStockBasicById(id);
  }

  /**
   * 查询股票基本信息列表
   *
   * @param stockBasic 股票基本信息
   * @return 股票基本信息
   */
  @Override
  public List<StockBasic> selectStockBasicList(StockBasic stockBasic) {
    return stockBasicMapper.selectStockBasicList(stockBasic);
  }

  /**
   * 新增股票基本信息
   *
   * @param stockBasic 股票基本信息
   * @return 结果
   */
  @Override
  public int insertStockBasic(StockBasic stockBasic) {
    return stockBasicMapper.insertStockBasic(stockBasic);
  }

  /**
   * 修改股票基本信息
   *
   * @param stockBasic 股票基本信息
   * @return 结果
   */
  @Override
  public int updateStockBasic(StockBasic stockBasic) {
    return stockBasicMapper.updateStockBasic(stockBasic);
  }

  /**
   * 批量删除股票基本信息
   *
   * @param ids 需要删除的股票基本信息主键
   * @return 结果
   */
  @Override
  public int deleteStockBasicByIds(Long[] ids) {
    return stockBasicMapper.deleteStockBasicByIds(ids);
  }

  /**
   * 删除股票基本信息信息
   *
   * @param id 股票基本信息主键
   * @return 结果
   */
  @Override
  public int deleteStockBasicById(Long id) {
    return stockBasicMapper.deleteStockBasicById(id);
  }
}
